package com.ofwiki.demo.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.ofwiki.demo.mapper.JobsMapper;
import com.ofwiki.demo.model.Jobs;

import java.util.List;

/**
 * (Jobs)服务实现类
 *
 * @author huang.js
 * @version 1.0
 * @date 2023-03-18
 */
@Service
public class JobsService extends ServiceImpl<JobsMapper, Jobs> {

    public List<Jobs> listByServiceName(String serviceName) {
        LambdaQueryWrapper<Jobs> eq = new QueryWrapper<Jobs>().lambda()
                .eq(Jobs::getServiceName, serviceName)
                .eq(Jobs::getMount, true);
        return baseMapper.selectList(eq);
    }
}
